<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Log;
class Kernel extends ConsoleKernel
{
  /**
   * The Artisan commands provided by your application.
   *任务调动的类
   * @var array
   */
  protected $commands = [
//    Commands\DyKeywordVideo::class,
//    Commands\DyKeywordVideoComment::class,
    Commands\DyUserVideo::class,
//    Commands\DyXunpan::class,      
    Commands\DyPopularMaterial::class,
//    Commands\DyFans::class,
    Commands\DyEnterprise::class,
    Commands\DyEnterpriseVideo::class,
    Commands\DySaveUserInfo::class, 
    Commands\JobXunpan::class,   
    Commands\JobXunpanDis::class,  
    Commands\JobFans::class,
    Commands\JobKeywordVideoComment::class,  
    Commands\JobKeywordVideo::class,  
  ];

  /**
   * Define the application's command schedule.
   * 这是任务调动的时间设置
   * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
   * @return void
   */
  protected function schedule(Schedule $schedule){
      
  
    //$schedule->command('JobXunpan')->hourly();     
    
    //定时询盘队列任务  每隔2个小时
    $schedule->command('JobXunpan')->cron('0 */2 * * *');   
    
    //定时询盘队列任务  每隔2个小时
    $schedule->command('JobXunpanDis')->hourly();     
      
    //获取关键词视频
    $schedule->command('JobKeywordVideo')->daily();
    
    //获取关键词视频评论 设置定时的
    $schedule->command('JobKeywordVideoComment')->dailyAt("2:00");
//    $schedule->command('DyKeywordVideoComment')->dailyAt("2:00");

    //获取粉丝和关注
    $schedule->command('JobFans')->daily();      
    
    //获取用户视频
    $schedule->command('DyUserVideo')->everyTenMinutes();
    
    //获取授权用户视频 
    $schedule->command('DyEnterpriseVideo')->dailyAt("4:00");    
    
//    //获取粉丝和关注 
//    $schedule->command('DyFans')->dailyAt("4:30");       
    
    //获取意向客户 
    $schedule->command('DyEnterprise')->dailyAt("4:30");  
    
    //获取榜单数据 
    $schedule->command('DyPopularMaterial')->dailyAt("10:00");   
    
    //更新授权用户信息 
    $schedule->command('DySaveUserInfo')->hourly();     
    
    //小于50M视频上传
//    $schedule->command('DyVideoUpload')->everyMinute();
//    //大于50M视频上传
//    $schedule->localhost('DyBigVideoUpload')->dailyAt('14:58');
  }
}
